<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
   <h1 class="page-header">创建新项目</h1>
   <div style="margin-left:300px;">
   		<div class="input-group input-group-lg">
		  <span class="input-group-addon" id="sizing-addon1">项目名称</span>
		  <input type="text" class="form-control" placeholder="项目名称" aria-describedby="sizing-addon2" style="width:500px;" id="projectTitle">
		</div>
		<br>
		<div class="input-group input-group-lg">
		  <span class="input-group-addon" id="sizing-addon1">测试类型</span>
		 <select class="selectpicker" data-style="btn-info" style="height:46px;width:500px;" id="testType">
		 		<option value="">请选择测试类型</option>
		 		<#list testList as list>
		 			<option value="${list.test_type}">${list.test_type_name}</option>
		 		</#list>
        </select>
		 <!--  <input type="text" class="form-control" placeholder="项目类型" aria-describedby="sizing-addon2"> -->
		</div>
		<br>
		<div class="input-group input-group-lg">
		  <span class="input-group-addon" id="sizing-addon1">测试平台</span>
		 <select class="selectpicker" data-style="btn-info" style="height:46px;width:500px;" id="platformType">
		 		<option value="">请选择平台类型</option>
		 		<#list sFormTypeList as sfList>
		 			<option value="${sfList.platformType}">${sfList.platformName}</option>
		 		</#list>
        </select>
		 <!--  <input type="text" class="form-control" placeholder="项目类型" aria-describedby="sizing-addon2"> -->
		</div>
		<br>
		<div class="input-group input-group-lg">
		  <span class="input-group-addon" id="sizing-addon1">项目类型</span>
		 <select class="selectpicker" data-style="btn-info" style="height:46px;width:400px;" id="projectType">
		 		<option value="">请选择项目类型</option>
		 		<#list projectList as list>
		 			<#if list.environment_type=="1">
		 				<#if list.platform_type=="1">
		 					<option value="${list.share_project_type}">${list.share_project_name} Web</option>
		 				<#elseif list.platform_type=="3">
		 					<option value="${list.share_project_type}">${list.share_project_name}  IOS</option>
		 				<#else>
		 					<option value="${list.share_project_type}">${list.share_project_name}  Android</option>
		 				</#if>
		 			</#if>
		 		</#list>
        </select>
        <input type="checkbox" id="checkEnviromentType" onclick="project.index.checkEnvironmentType();" style="margin:0 5px;">
        <span id="preEnviroment">生产环境</span>
		 <!--  <input type="text" class="form-control" placeholder="项目类型" aria-describedby="sizing-addon2"> -->
		</div>
		<br>
		<div class="input-group input-group-lg" id="packageName" style="margin: 0px 0px 20px 0px;">
		  <span class="input-group-addon" id="sizing-addon1" >Package</span>
		  <input type="text" class="form-control" placeholder="Package" aria-describedby="sizing-addon2" style="width:500px;" id="projectPackage">
		</div>
		<div class="input-group input-group-lg" id="appActivity" style="margin: 0px 0px 20px 0px;">
		  <span class="input-group-addon" id="sizing-addon1">Activity&nbsp;&nbsp;&nbsp;</span>
		  <input type="text" class="form-control" placeholder="Activity" aria-describedby="sizing-addon2" style="width:500px;" id="projectActivity">
		</div>
		<div class="input-group input-group-lg" id="loginUrl" style="margin: 0px 0px 20px 0px;">
		  <span class="input-group-addon" id="sizing-addon1" >首页地址</span>
		  <input type="text" class="form-control" placeholder="首页地址" aria-describedby="sizing-addon2" style="width:500px;" id="projectLoginUrl">
		</div>
		<!-- <div class="input-group input-group-lg">
		  <span class="input-group-addon" id="sizing-addon1">组件构建</span>
		   <select class="selectpicker" data-style="btn-info" style="height:46px;width:500px;" id="projectFlag">
		 		<option value="">请选择</option>
		 		<option value="0"><lable>&nbsp;是</lable></option>
		 		<option value="1"><lable>&nbsp;否</lable></option>
        </select>
		</div>
		<br> -->
		<div class="input-group input-group-lg">
		  <span class="input-group-addon" id="sizing-addon1">项目描述</span>
		  <div class="form-group">
		    <textarea class="form-control" rows="3" placeholder="项目描述内容" style="width:500px;" id="projectDesc"></textarea>
		  </div>
		</div>
		<br>
		<div class="btn-group btn-group-lg" role="group" aria-label="Large button group">
			<button type="button" class="btn btn-lg btn-primary" style="margin-left:300px;" id="projectBtn" onclick="project.index.insertProject();">保存</button>
		</div>
   </div>
</div>
<script type="text/javascript">
	$("#platformType").bind("click",function(){
		//获取平台类型
		var platformType = $("#platformType").find("option:selected").text();
		if(""!=platformType&&"null"!=platformType){
			if("ios"==platformType){
				$("#packageName").show();
				$("#appActivity").hide();
				$("#loginUrl").hide();
			}else if("Web"==platformType){
				$("#packageName").hide();
				$("#appActivity").hide();
				$("#loginUrl").show();
			}else{
				$("#packageName").show();
				$("#appActivity").show();
				$("#loginUrl").hide();
			}
		}
		
	});
</script>